package com.example.vehicleservice.mapper;


import com.example.vehicleservice.bean.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName：NewCarMapper
 * @Author: Vvn
 * @Date: 2025/5/29 9:26
 * @Description: 必须描述类做什么事情, 实现什么功能
 */

@Mapper
public interface NewCarMapper {

    // TODO: 2025/6/6  行程分析
    @Select("select Vin,distance from new_car.car_realtime")
    List<CarRealtime> getCarRealtime();

    // TODO: 2025/6/6 异常监控与告警 
    @Select("select * from new_car.car_Try") 
    List<carTry> getCarTry();

    // TODO: 2025/6/6  实时在线统计车辆数
    @Select("select * from new_car.vehicle_count")
    List<VehicleCount> getVehicleCount();

    // TODO: 2025/6/6  电池的平均健康度
    @Select("select * from new_car.vehicle_dws_battery_Health")
    List<VehicleDwsBatteryHealth> getVehicleDwsBatteryHealth();

    // TODO: 2025/6/6 热力分布图
    @Select("select * from new_car.vehicle_geohash_vin_count")
    List<VehicleGeohashVinCount> getVehicleGeohashVinCount();

    // TODO: 2025/6/6 实时监控车辆
    @Select("select vin,\n" +
            "speed,\n" +
            "batteryLevel,\n" +
            "batteryTemp,\n" +
            "motorTemp,\n" +
            "chargingStatus,\n" +
            "energyConsumption from new_car.vehicle_status")
    List<VehicleStatus> getVehicleStatus();
}
